Being able to disable/re-enable an event listener for a given node
Categories
(DevTools :: Inspector, enhancement, P3)
Tracking
(firefox98 fixed)
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: pbro, Assigned: nchevobbe)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Not sure if this belongs more in the Inspector or in the Debugger panel, but in any case, that's a common need that the WebCompat diagnosis team has sent our way. Chrome let's you do half of this (just remove), but annoyingly, you have to close/open devtools to get it back.
Comment 1•6 years ago
|
||
Tom's built something like this is his debugging add-on: https://github.com/webcompat/tinker-tester-developer-spy
Comment 2•6 years ago
|
||
It can be useful, when debugging a site, to toggle event listeners, especially when there are multiple handlers set on parent nodes, etc.
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 3•6 years ago
|
||
This feature is planned as part of "Pause on Event" project. You might also see: https://docs.google.com/document/d/1HPTnwnYydsRBRZw3XqGoiOSaMSIeHBvKRQENm4RegPI/edit?ts=5bce6279#heading=h.532o8ksi95wv Honza
Comment 4•6 years ago
|
||
Duplicate of bug 1226637? I see one difference in that this one focuses on node events, while bug 1226637 covers all events. I guess the Events panel will also cover all events, right? Sebastian
Comment 5•6 years ago
|
||
(In reply to Sebastian Zartner [:sebo] from comment #4) > Duplicate of bug 1226637? I see one difference in that this one focuses on > node events, while bug 1226637 covers all events. I guess the Events panel > will also cover all events, right? Yes, it's duplicate This bug covers side-panel in the Inspector panel (ie listeners for the selected node/element) as well as the other bug - marked as "[inspector panel]". I'll close bug 1226637 and copy one comment from bgrins that sounds useful. Thanks! Honza
Comment 6•6 years ago
|
||
Copying over a relevant comment from bug 1226637 by :bgrins: ==== That would be pretty nice! A few thoughts: 1) I think it'd need some UX work as far as how to show disabled event listeners in the inspector / debugger. 2) There's event listener breakpoint work planned at https://github.com/devtools-html/debugger.html/issues/4750 / https://docs.google.com/document/d/1DXzoa7cUZJ_z41_QK1I1nPtyexkgGxup7C_at1SCcQs/edit. It's not the same usecase but maybe we could re-use some of the UI concepts for listing and managing listeners. 3) Would be interesting if it could be extended to any EventTarget when we allow event inspection in the console. ====
It looks like the Event Breakpoints feature is complete (at least it's present in Dev Edition), but I still cannot disable specific events. Was this shelved?
Comment 10•4 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #3)
This feature is planned as part of "Pause on Event" project.
You might also see:
https://docs.google.com/document/d/
1HPTnwnYydsRBRZw3XqGoiOSaMSIeHBvKRQENm4RegPI/edit?ts=5bce6279#heading=h.
532o8ksi95wvHonza
Hello,
It seems that features were different: "remove an event listener from devtools" and "pause or breakpoint on events".
The 2nd one is OK, but, like vaindil, I don't see the 1st one.
I don't understand why https://bugzilla.mozilla.org/show_bug.cgi?id=1226637 was marked as duplicate and resolved, for me, it was totally different, even if some code could be reused.
Benjamin
Comment 11•3 years ago
|
||
Hello,
I see this issue has been resolved, but not actually implemented.
I would like to be able to toggle events on/off, or in the least disable them like I can on Chrome. This is a core feature when working as a web developer and I sadly must always switch over to Chrome for Event related debugging...
Comment 12•3 years ago
|
||
(In reply to dbkup from comment #11)
Hello,
I see this issue has been resolved, but not actually implemented.
I would like to be able to toggle events on/off, or in the least disable them like I can on Chrome. This is a core feature when working as a web developer and I sadly must always switch over to Chrome for Event related debugging...
What I mean is the linked bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1226637 is marked as duplicate and resolved, but doesn't actually fix the issue as described above.
Comment 13•3 years ago
|
||
(In reply to dbkup from comment #12)
(In reply to dbkup from comment #11)
Hello,
I see this issue has been resolved, but not actually implemented.
I would like to be able to toggle events on/off, or in the least disable them like I can on Chrome. This is a core feature when working as a web developer and I sadly must always switch over to Chrome for Event related debugging...What I mean is the linked bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1226637 is marked as duplicate and resolved, but doesn't actually fix the issue as described above.
The resolution of that bug is DUPLICATE
. That means that the person who closed it did so not because they think the issue is fixed, but because they don't want to have multiple bugs open that all track the same issue. This keeps discussion of the issue focused in one place and simplifies maintenance.
Comment 14•3 years ago
|
||
Would super love this feature back again. Thanks!
Assignee | ||
Comment 15•2 years ago
|
||
Depends on D135130
Updated•2 years ago
|
Comment 16•2 years ago
|
||
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5a82b7a2951e [devtools] Add a way to disable (and re-enable) event listener for a given node. r=ochameau,devtools-backward-compat-reviewers,bomsy.
Assignee | ||
Comment 18•2 years ago
|
||
Fixed the test failure (it was a leak because accessing nsIEventListenerInfo.enabled
while the page closes, i guess, was throwing and not clearing the node actor map properly)
Comment 19•2 years ago
|
||
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c4da31624b83 [devtools] Add a way to disable (and re-enable) event listener for a given node. r=ochameau,devtools-backward-compat-reviewers,bomsy.
Comment 20•2 years ago
|
||
bugherder |
Description
•